﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Domain.Entities
{
    static class MemoryFileNames
    {
        private static Queue<string> names = new Queue<string>();
        private static Object _lock = new object();

        public static int getCount()
        {
            lock (_lock)
            {
                return names.Count;
            }
        }
        public static string getName()
        {
            return names.Dequeue();
        }

        public static void setName(string s)
        {
            names.Enqueue(s);
        }
        public static void All()
        {
            foreach (var item in names)
            {
                Console.WriteLine(item);
            }
        }
    }
}
